<?php

namespace App\Model;

class CategoryModel extends BaseModel
{
    protected $table = 'category';

    protected $primaryKey = 'category_id';

    protected $fillable = [
        'category_name'
    ];


    public function goods(): \Illuminate\Database\Eloquent\Relations\HasMany
    {
        return $this->hasMany(ProjectsModel::class,'category_id','category_id');
    }



    public function userStock(): \Illuminate\Database\Eloquent\Relations\HasMany
    {
        return $this->hasMany(UsersStockModel::class,'category_id','category_id');
    }
}
